package com.example.demo.web;


import org.springframework.jms.annotation.JmsListener;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

//消息消费者
@RestController
public class Consumer {
    @JmsListener(destination="itcast")
    public void readMessage(String text){
        System.out.println("接收到消息："+text);
    }


    @JmsListener(destination="itcast_map")
    public void readMap(Map map){
        System.out.println(map);
    }
}
